deep.dir = '/home1/99/jc152199/brt/output/optimization_with_drops/max/P_01/P_02/P_03/P_04/P_05/P_06/P_07/P_08/P_09/P_10/P_11/P_12/P_13/P_14/P_15/P_16/'
base.dir = '/home1/99/jc152199/brt/output/optimization_with_drops/max/'

p.list = seq(1,16,1)
p.list = sprintf('%02i',p.list)
p.list = paste('P_',p.list,sep='')

i=0

for (ii in 1:15)


	{
	
	from.dir = substr(deep.dir,1,nchar(deep.dir)-i)
	
	system(paste('mv ',from.dir,' ',base.dir,sep=''))
	
	system(paste('rm ',from.dir,sep=''))
	
	i=i+5
	
	}
	
## Done

### I've never tested this script, be wary when using the system(paste('rm...')) command